%html{lang: "ar"}
= form_for(@initiative, html: {:role => "form",:multipart => true}) do |f|
  - if @initiative.errors.any?
    #error_explanation
      %h2
        = pluralize(@initiative.errors.count, "error")
        prohibited this initiative from being saved:
      %ul
        - @initiative.errors.full_messages.each do |message|
          %li= message
  .row
    .col-md-5
      .form-group
        .col-md-11.title-font.green-font.text-right
          = f.label :"صورة المبادرة"
        .col-md-5
        .col-md-5.text-right.upload-preview.image-frame
          %input.file
            .upload-preview
              %img/
            = f.file_field :image , class: 'initiative-img', class: 'file'

    .col-md-6.green-font.text-right
      = f.hidden_field :sector_id
      = f.hidden_field :user_id, :value => current_user.id
      .form-group
        .col-md-9
          %span 
         
          %br
           
        .col-md-3.title-font
          = f.label :"مبادرة بقطاع"      
      .form-group.green-border
        .col-md-9.padding-top
          = f.text_field :title, class: 'form-control', rows: "6"
        %br
        .col-md-3.title-font
          = f.label :"عنوان المبادرة"
          
      .form-group
        .col-md-9
          = f.text_area :description, class: 'form-control ckeditor',:rows => "12"
        .col-md-3.title-font
          = f.label :"تفاصيل المبادرة"
      
      .form-group
        .col-md-9
          = f.select(:region_id,@regions, {}, {class: 'form-control text-right'})
        .col-md-3.title-font
          = f.label :"    منطقة المبادرة"
      .form-group
        .col-md-9
          = text_field_tag :tags, nil, {class: 'form-control',data:{role:'tagsinput'}}
        .col-md-3.title-font
          = label_tag :"التصنيفات"
      .actions
        .col-md-12.padding-bottom
          = f.submit 'استمرار', class: 'btn green-btn title-font'
